package org.lmind.example.util.text;

import static org.junit.Assert.*;
import java.util.regex.Pattern;
import org.junit.Test;

public class PatternTextTemplateTestCase {

	@Test
	public void test() {
		PatternTextTemplate template = new PatternTextTemplate(
				Pattern.compile("(\\w)\\+(\\w)=(\\w)"), "${3}-${1}=${2}");
		String output = template.transform("a+b=x");
		assertEquals("x-a=b", output);
	}

}
